﻿@{
    ViewBag.Title = "保存公告";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@model JStore.Web.Controllers.SysManage.ViewModels.SaveNewsModel
<link href="../../Scripts/jquery-validation-engine/css/template.css" rel="stylesheet"
    type="text/css" />
<link href="../../Scripts/kindeditor-4.1.4/themes/default/default.css" rel="stylesheet"
    type="text/css" />
<link href="../../Scripts/jquery-validation-engine/css/validationEngine.jquery.css"
    rel="stylesheet" type="text/css" />
<script src="../../Scripts/jquery-1.7.1.min.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-validation-engine/js/jquery.validationEngine.js"
    type="text/javascript"></script>
<script src="../../Scripts/jquery-validation-engine/js/languages/jquery.validationEngine-zh_CN.js"
    type="text/javascript"></script>
<script src="../../Scripts/kindeditor-4.1.4/kindeditor-min.js" type="text/javascript"></script>
<script type="text/javascript">
    $(function () {
        $("#form1").validationEngine();
        
        var editor = KindEditor.create('textarea[name="NewsContent"]', { 
            syncType: '',
            items: [
                    'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste', 'plainpaste', 'wordpaste', '|',
                    'justifyleft', 'justifycenter', 'justifyright', 'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
                    'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline', 'strikethrough', 'lineheight',
                    'removeformat', '|', 'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'pagebreak', //'multiimage','baidumap'
                    'anchor', 'link', 'unlink', '|', 'about'
                ],
            afterBlur: function () {
                editor.sync();
            }
        });
    })
</script>
<div class="right_box_card">
    <ul>
        <li class="right_box_card1"><a href="#">保存公告</a></li>
    </ul>
</div>
@using (Html.BeginForm("SaveNews", "SysManage", FormMethod.Post, new { @class = "formular", id = "form1" }))
{
    <table class="enter_tab" width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr height="40">
            <td class="entry_tab_td1">
                @Html.HiddenFor(c => c.Id)
                @Html.LabelFor(c => c.Title)
            </td>
            <td class="entry_tab_td2">
                @Html.TextBoxFor(c => c.Title, new { @class = "text-input validate[required]" })
            </td>
        </tr>
        <tr height="40">
            <td class="entry_tab_td1">
                @Html.LabelFor(c => c.NewsContent)
            </td>
            <td class="entry_tab_td2">
                @Html.TextAreaFor(c => c.NewsContent, new { @class = "validate[required]" ,style="width:700px;height:300px;" })
            </td>
        </tr>
        <tr height="40">
            <td class="entry_tab_td1">
            </td>
            <td class="entry_tab_td2">
                <input type="submit" value="保存公告" class="submit" style="float: left;" />
                <input type="button" value="返回" onclick="history.go(-1);" class="submit" style="float: left; margin-left: 10px; height:28px;" />
            </td>
        </tr>
    </table> 
}
